package com.aaa.entity;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 
 * @TableName o_oderdetails
 */
public class OOderdetails implements Serializable {
    /**
     * id
     */
    private String id;

    /**
     * 对应订单表的订单号
     */
    private String odercode;

    /**
     * 买家id
     */
    private String uid;

    /**
     * 商家id
     */
    private String bid;

    /**
     * 商品名
     */
    private String gname;

    /**
     * 商品图片
     */
    private String img;

    /**
     * 购买的商品数量
     */
    private Integer totalnum;

    /**
     * 购买时的价格
     */
    private BigDecimal price;

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    public String getId() {
        return id;
    }

    /**
     * id
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 对应订单表的订单号
     */
    public String getOdercode() {
        return odercode;
    }

    /**
     * 对应订单表的订单号
     */
    public void setOdercode(String odercode) {
        this.odercode = odercode;
    }

    /**
     * 买家id
     */
    public String getUid() {
        return uid;
    }

    /**
     * 买家id
     */
    public void setUid(String uid) {
        this.uid = uid;
    }

    /**
     * 商家id
     */
    public String getBid() {
        return bid;
    }

    /**
     * 商家id
     */
    public void setBid(String bid) {
        this.bid = bid;
    }

    /**
     * 商品名
     */
    public String getGname() {
        return gname;
    }

    /**
     * 商品名
     */
    public void setGname(String gname) {
        this.gname = gname;
    }

    /**
     * 商品图片
     */
    public String getImg() {
        return img;
    }

    /**
     * 商品图片
     */
    public void setImg(String img) {
        this.img = img;
    }

    /**
     * 购买的商品数量
     */
    public Integer getTotalnum() {
        return totalnum;
    }

    /**
     * 购买的商品数量
     */
    public void setTotalnum(Integer totalnum) {
        this.totalnum = totalnum;
    }

    /**
     * 购买时的价格
     */
    public BigDecimal getPrice() {
        return price;
    }

    /**
     * 购买时的价格
     */
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OOderdetails other = (OOderdetails) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOdercode() == null ? other.getOdercode() == null : this.getOdercode().equals(other.getOdercode()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getBid() == null ? other.getBid() == null : this.getBid().equals(other.getBid()))
            && (this.getGname() == null ? other.getGname() == null : this.getGname().equals(other.getGname()))
            && (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg()))
            && (this.getTotalnum() == null ? other.getTotalnum() == null : this.getTotalnum().equals(other.getTotalnum()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOdercode() == null) ? 0 : getOdercode().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getBid() == null) ? 0 : getBid().hashCode());
        result = prime * result + ((getGname() == null) ? 0 : getGname().hashCode());
        result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode());
        result = prime * result + ((getTotalnum() == null) ? 0 : getTotalnum().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", odercode=").append(odercode);
        sb.append(", uid=").append(uid);
        sb.append(", bid=").append(bid);
        sb.append(", gname=").append(gname);
        sb.append(", img=").append(img);
        sb.append(", totalnum=").append(totalnum);
        sb.append(", price=").append(price);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}